#define _CRT_SECURE_NO_WARNINGS 1
#include <iostream>
using namespace std;
int main5() {
    int n;
    cout << "in put end number:";
    cin >> n;
    int i = 1, sum = 0;
    sum = (((1 + n) * n) >> 1);
    cout << "sum = " << sum << endl;
    return 0;
}
